package com.itheima.CharStream.CharOutputStream;


import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class CharStreamDemo1 {
    public static void main(String[] args) throws IOException {
        //创建对象

        FileWriter fw = new FileWriter("day623CharStream\\xx.txt");

        fw.write('我');

        //刷新缓冲区flush
        fw.flush();

        char[] cha = {'一', '次', '写'};
        fw.write(cha);

        char[]cha2={'两','个','字','符','进','数','组'};
        fw.write(cha2,2,3);

        String s="数组";
        fw.write(s);

        String s2="集合，可以继续写入";
        fw.write(s2,2,7);

        fw.close();

    }
}
